<style scoped src="./index.scss" lang="scss" rel="stylesheet/scss"></style>
<template src="./index.html"></template>
<script>
    import Edit from "./../edit/index";
    export default {
        mixins: [Vue.prototype.$vFN.Mixins.Base, Vue.prototype.$vFN.Mixins.Page, Vue.prototype.$vFN.Mixins.Table],
        data() {
            return {
                appWindow: window,
                // 页面接口地址
                apiUrl: {
                    delete: "mall-site-portal/product-groups/delete",
                    list: "mall-site-portal/product-groups/treeList",
                },
                // 表格查询数据
                mixinTable_tableSearchData: {},
                // 表格数据
                tableData: [],
                // 表格数据删除展示结构
                tableDeleteConfig: {
                    columns: [
                        {
                            label: "图标",
                            prop: "icon",
                            type: "img"
                        },
                        {
                            label: "分组名称",
                            prop: "name"
                        },
                        {
                            label: "绑定商品数量",
                            prop: "productCount"
                        },
                        {
                            label: "是否显示",
                            prop: "isHide",
                            type: "state-icon",
                        options:{
                            success:0,
                            error:1,
                        }
                        },
                    ],
                    // title: "确定停用以下内容么?",
                },
                // 表格数据类型
                mixinTable_tableDataType: "tree",


                // 数据字典
                // 菜单类型
                dict_menu_type: [],

            };
        },
        methods: {
            // 打开添加/修改
            editBoxOpen(params_) {
                let _d = {
                    mixinEdit_parent:this,
                    mixinEdit_editType: params_.type,
                    id: params_.id,
                }
                if (params_.parentId) {
                    _d.parentId = params_.parentId
                }
                Edit.init(_d)
            },
            // 初始化
            async init() {

                this.mixinTable_refreshData();
            },

        },
        mounted() {
            this.init();

        },
        activated() {},
    };
</script>